import React, { Component } from 'react'
import { StyleSheet, View, ScrollView, Image, Dimensions } from 'react-native'
import Swiper from 'react-native-swiper'

export default class SwiperDemo extends Component {
  render() {
    return (
      <View>
        <ScrollView>
          <Swiper style={[styles.wrapper]} showsButtons={true}>
            <Image
              source={require('../../images/1.jpg')}
              style={[styles.slideImage]}
            />
            <Image
              source={require('../../images/2.jpg')}
              style={[styles.slideImage]}
            />
            <Image
              source={require('../../images/3.jpg')}
              style={[styles.slideImage]}
            />
          </Swiper>
        </ScrollView>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  wrapper: {
    height: 200
  },
  slideImage: {
    width: Dimensions.get('window').width, 
    height: 200
  }
})
